﻿{include file=header.html}
<script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
<script language="javascript" type="text/javascript" src="{lib file=jquery.plugins/jquery.validate.js}"></script>
<script type="text/javascript">
$(function(){
     $('#feature_form').validate({
        onkeyup : false,
		onfocusout : false,
		rules : {
			feature_name: {
				required: true,
				remote: 'index.php?app=feature&act=check_feature&feature_name=' + $('#feature_name').val() + '{if $smarty.get.act eq 'edit'}&id={$smarty.get.id}{/if}'
			}
		},
		messages : {
			feature_name: {
				required: '{$lang.feature_name_not_empty}',
				remote: '{$lang.feature_name_is_exist}'
			}
		}
	});
});
</script>
<style>
label.error {margin-left:2em; color:#FF0000;}
</style>
<body>
<div class="sub-body">
<div class="tab-frame">
<div class="tab-title-1">
<!--{if $smarty.get.act eq 'add'}--><span>{$lang.add_new_feature}</span><!--{else}--><span>{$lang.edit_feature}</span><!--{/if}-->
</div>
<form action="{url app=feature&act=$smarty.get.act}{if $smarty.get.id}&amp;id={$smarty.get.id}{/if}" method="post" id="feature_form">
<table cellspacing="0" cellpadding="0" class="tab-display" id="tab-color">
	<tr>
		<th width="70" align="right">{$lang.feature_name}：</th>
		<td align="left"><input type="text" name="feature_name" id="feature_name" value="{$feature.feature_name}" style="width:300px;" class="input-1" /></td>
	</tr>
	<tr>
		<th align="right">{$lang.description}：</th>
		<td align="left"><textarea name="description" cols="60" rows="5">{$feature.description}</textarea></td>
	</tr>
	<tr>
		<th align="right">{$lang.if_show}：</th>
		<td align="left"><label><input type="radio" name="if_show" value="1" {if $feature.if_show == 1}checked="checked"{/if} />{$lang.yes}</label>&nbsp;&nbsp;&nbsp;&nbsp;<label><input type="radio" name="if_show" value="0" {if $feature.if_show == 0}checked="checked"{/if} />{$lang.no}</label></td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="submit" value="{$lang.submit}" class="btn-2"/></td>
	</tr>
</table>
</form>
<script language="javascript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
</div>
</div>
</body>
</html>